<template>
  <div class="rewardbar-wrapper">
    <el-button @click="handleLike">👍点赞</el-button>
    <el-button @click="handleFavorite">💖收藏</el-button>
  </div>
</template>

<script>
export default {
  name: 'RewardBar',
  data() {
    return {

    }
  },
  methods: {
    handleLike(event) {
      // 失去焦点
      event.target.blur()
      if (event.target.nodeName === 'SPAN') {
        event.target.parentNode.blur()
      }
      this.$emit('clickLike')
    },
    handleFavorite(event) {
      // 失去焦点
      event.target.blur()
      if (event.target.nodeName === 'SPAN') {
        event.target.parentNode.blur()
      }
      this.$emit('clickFavorite')
    }
  }
}
</script>

<style lang="scss" scoped>
.rewardbar-wrapper {
  display : flex;
  flex-direction : row;
  justify-content : flex-end;
}

</style>
